package com.ruoyi.purchase.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.TPurchaseMapper;
import com.ruoyi.purchase.domain.TPurchase;
import com.ruoyi.purchase.service.ITPurchaseService;

/**
 * 团购管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-10
 */
@Service
public class TPurchaseServiceImpl implements ITPurchaseService 
{
    @Autowired
    private TPurchaseMapper tPurchaseMapper;

    /**
     * 查询团购管理
     * 
     * @param purchaseId 团购管理主键
     * @return 团购管理
     */
    @Override
    public TPurchase selectTPurchaseByPurchaseId(Long purchaseId)
    {
        return tPurchaseMapper.selectTPurchaseByPurchaseId(purchaseId);
    }

    /**
     * 查询团购管理列表
     * 
     * @param tPurchase 团购管理
     * @return 团购管理
     */
    @Override
    public List<TPurchase> selectTPurchaseList(TPurchase tPurchase)
    {
        return tPurchaseMapper.selectTPurchaseList(tPurchase);
    }

    /**
     * 新增团购管理
     * 
     * @param tPurchase 团购管理
     * @return 结果
     */
    @Override
    public int insertTPurchase(TPurchase tPurchase)
    {
        return tPurchaseMapper.insertTPurchase(tPurchase);
    }

    /**
     * 修改团购管理
     * 
     * @param tPurchase 团购管理
     * @return 结果
     */
    @Override
    public int updateTPurchase(TPurchase tPurchase)
    {
        return tPurchaseMapper.updateTPurchase(tPurchase);
    }

    /**
     * 批量删除团购管理
     * 
     * @param purchaseIds 需要删除的团购管理主键
     * @return 结果
     */
    @Override
    public int deleteTPurchaseByPurchaseIds(Long[] purchaseIds)
    {
        return tPurchaseMapper.deleteTPurchaseByPurchaseIds(purchaseIds);
    }

    /**
     * 删除团购管理信息
     * 
     * @param purchaseId 团购管理主键
     * @return 结果
     */
    @Override
    public int deleteTPurchaseByPurchaseId(Long purchaseId)
    {
        return tPurchaseMapper.deleteTPurchaseByPurchaseId(purchaseId);
    }
}
